import React from 'react';

//router
import { Router, Route, Link, hashHistory } from 'react-router';
 import APP from './app.jsx';
 import Main from './pages/main.jsx';
 import SevicesList from './pages/sevicesList.jsx';
 import NearBy from './pages/nearby.jsx';
 import PublishService from './pages/publishService.jsx';
 import PublishSkill from './pages/publishSkill.jsx';
 import Orders from './pages/order.jsx';
 import Mine from './pages/mine.jsx';
 import MyOrders from './pages/myOrder.jsx';
 import Evaluate from './pages/evaluate.jsx';
 import MyDetails from './pages/myDetail.jsx';
 import Services from './pages/service.jsx';
 import Skills from './pages/skills.jsx';
 import Commont from './pages/commont.jsx';
 import CommontList from './pages/commontList.jsx';
 import Notice from './pages/notices.jsx';
 import DemandDetail from './pages/DemandDetail.jsx';
 import SkillDetail from './pages/skillDetail.jsx';
 import OrderDetail from './pages/orderDetail.jsx';
 import City from './pages/city.jsx';
 import Mypublish from './pages/myPublishs.jsx';

export default class Routers extends React.Component{
    constructor(props){
        super(props);
    }
    render(){
        return (
            <Router history={hashHistory}>
                <Route component={APP}>
                    {/*服务分类列表*/}
                    <Route path='/sevicesList' components={SevicesList} />
                    {/* 首页 */}
                    <Route  path='/'     component={Main} />
                    <Route path="/main" component={Main} />
                    {/*附近服务或需求的列表*/}
                    <Route path='/nearby' components={NearBy} />
                    {/*发布需求界面*/}
                    <Route path='/publishService' components={PublishService} />
                    {/*发布技能界面*/}
                    <Route path='/publishSkill' components={PublishSkill} />
                    {/* 订单界面*/}
                    <Router path='/orders' components={Orders} />
                    {/*我的界面*/}
                    <Router path='/mine' components={Mine} />
                    {/*我的订单界面*/}
                    <Router path='/myOrders' components={MyOrders}/>
                    {/*评价页面*/}
                    <Router path='/evaluate' components={Evaluate}/>
                    {/*我的详细信息*/}
                    <Router path='/myDetail' components={MyDetails}/>
                    {/*需求池*/}
                    <Router path="/service" components={Services}/>
                    {/*技能池*/}
                    <Router path="/skills" components={Skills}/>
                    {/*评价界面*/}
                    <Router path="/commont" components={Commont}/>
                    {/*评价列表界面*/}
                    <Router path="/commontList" components={CommontList}/>
                    {/*通知了表*/}
                    <Router path="/notice" components={Notice} />
                    {/*需求详情*/}
                    <Router path='/demandDetail' components={DemandDetail} />
                    {/*技能详情*/}
                    <Router path='/skilDetail' components={SkillDetail} />
                    {/*订单详情*/}
                    <Router path='/orderDetail' components={OrderDetail} />
                    {/*选择城市页面*/}
                    <Router path='/city' components={City} />
                    {/*我的发布界面*/}
                    <Router path='/myPublish' components={Mypublish} />
                </Route>
            </Router>
        )
    }
}